package models

import "time"

/**
* Created by LONG  on 2018/5/28.
 */
type Student struct {
	StudentID   uint    `gorm:"primary_key"`
	Username    string  `gorm:"unique_index;default:null"` //用户名
	Password    string  `gorm:"default:null"`              //密码
	VerifyState bool    `gorm:"default:false"`
	Phonenum    string  `gorm:"default:null"` //手机号码
	StudyPee    int     `gorm:"default:0"`    //邮箱验证状态
	Gender      int     `gorm:"nul null"`
	AvatarUrl   string  // 头像链接
	NickName    string  // 昵称
	Classes     []Class `gorm:"many2many:stu_class;"` // Many-To-Many , 'stu_class'是连接表
	//ExamScores  []ExamScore                                // One-To-Many (拥有多个 - Email表的StudentID作外键)
	CreatedAt time.Time
	UpdatedAt time.Time
}
